home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / LCCBIN / !clib / !Help < prev    next >
Text File  |  1998-03-19  |  3KB  |  93 lines

  1. !Clib - The Shared C Library Header Files
  2. =========================================
  3.  
  4. This directory contains the necessary header files and object file to
  5. enable programs to use the SharedCLibrary module.
  6.  
  7. This library is release 1.04 and is © Copyright 1997, 1998 Nick Burrett
  8.  
  9. !Clib is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12.  
  13.  
  14. Files
  15. -----
  16.  
  17. All header files are accessible through the path C: or Clib:
  18.  
  19. All programs must additionally link with the Acorn Object Format (AOF)
  20. file C:o.stubs (or clib:o.stubs).
  21.  
  22.  
  23. Installation
  24. ------------
  25.  
  26. Copy the directory !clib somewhere on your hard disc. Double-clicking on it
  27. will setup the necessary paths, ready for use.
  28.  
  29. With a slight modification, this library can be used with Easy C and Acorn C.
  30. To do this, you need to obtain the stdarg.h and varargs.h header files
  31. appropriate to your compiler and copy them into !clib.h.stdarg and
  32. !clib.h.varargs. You must also copy the definition of va_list and put it
  33. towards the start of !clib.h.stdio, renaming va_list to __va_list.
  34.  
  35. Using the SharedCLibrary library
  36. --------------------------------
  37.  
  38. For general use, all that is needed is an extra command line option to GCC:
  39.   -mstubs
  40. This will force GCC to search the GCC: and C: paths instead of the usual
  41. GCC: and Unix: paths.
  42.  
  43. The library to link against is c:o.stubs
  44.  
  45. The following commands will compile the file c.hellow:
  46.   *gcc -c c.hellow -O2 -mstubs
  47.   *drlink -o hellow o.hellow gcc:o.libgcc c:o.stubs
  48.  
  49. If you use LD, then add '-Lc: -lstubs' to the command line.
  50.  
  51.  
  52. Filename translation for the Shared C Library
  53. ---------------------------------------------
  54.              
  55. The Shared C Library does not benefit from UnixLib's filename translation
  56. code. However, defining the symbol __UNAME before you include stdio.h will
  57. cause remove(), rename(), fopen() and freopen() to use the UnixLib filename
  58. translation code on the filenames supplied as arguments to those functions.
  59. You must also link with the object file libuname.o, using the command-line
  60. option "-luname" to gcc or ld.
  61.  
  62. See the GCC and UnixLib documentation for instructions on how to use the
  63. filename translation code, especially the fancy options. Much information is
  64. given in the source, uname.c, provided, which is a hacked version of that
  65. supplied with UnixLib.
  66.  
  67. Thanks go to Reuben Thomas for the effort here.
  68.  
  69.  
  70. Known problems with the filename translation code
  71. -------------------------------------------------
  72.  
  73. If you use command-line redirection of stdin and stdout, the filenames used
  74. for redirection are not translated. If this is important, use UnixLib.
  75.  
  76. Directories are not automatically created, so if a file called "junk.o" is
  77. opened when its parent directory does not have a subdirectory called "o" the
  78. attempt will fail.
  79.  
  80.  
  81. SharedCLibrary and the CallASWI module
  82. --------------------------------------
  83.  
  84. Code linked for execution with the SharedCLibrary will not need to have the
  85. CallASWI module distributed with it.
  86.  
  87.  
  88. Contacting me
  89. -------------
  90.  
  91. If you require help or have found a bug, then please e-mail me at
  92. nick.burrett@btinternet.com
  93.